Computer databases are a common mechanism for storing information on computer systems while providing easy access to users. A typical database is an organized collection of related information stored as rows having fields of information. As an example, a database of employees may have a row for each employee comprising different columns or fields such as name, department, phone number, salary, etc. Rows are organized in a table, a two-dimensional structure with rows indicating the rows having fields of information and columns indicating the fields.
To speed up access to the data of the database table, rows can be indexed and the index entered into a base index. For example, one index can indicate where to find the rows containing a particular name, another index can indicate where to find the rows containing specific departments.
To allow for complete responses to queries, each time the database is updated by inserting a new row, the index or indexes are also updated; i.e., a corresponding entry is inserted in the index.
Rows and indexes are physically stored on storage media such as tape or disk. When taking any action on the database such as processing a query, inserting a new row, indexing a new row, etc., the corresponding data is retrieved from the storage medium into a cache. The database management system performs actions on the data while the data is in the cache.
In large databases, the index is also large. Consequently, new entries are time consuming. This is particularly a problem if the index is larger than the cache such that many storage medium reads are necessary for updating the index.
What is therefore needed is a system, a computer program product, and a method for indexing incrementally to enhance the inserting performance of a database. The need for this solution has heretofore remained unsatisfied.